package com.example.day02;

//方法的重载

public class LoadMethod {
    public static void main(String[] args) {

        LoadMethod m=new LoadMethod();
        System.out.println(m.add("adbfdsf"));
        int sub = m.sub(2, 3);
        System.out.println(sub);


        System.out.println(    m.add(10.0));

    }

    public  int add(int a){
        return a;
    }
    public  String add(String str){
        return str;
    }
    public  String add(double b){
        return b+"";
    }

    public  int sub(int a,int b){
        int result=a+b;
        return  result;
    }
}
